package router

import (
	"fmt"

	"github.com/gin-gonic/gin"
)

func PathParam(r *gin.Engine){
	r.GET("/books/:id",func(ctx *gin.Context) {
		id := ctx.Param("id")
		fmt.Printf("第一个参数为%s\n",id)
	})
	r.GET("/books/list",func(ctx *gin.Context) {
		fmt.Println("第一个参数为")
	})
}